<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>用户输入一个整数n，计算n的阶乘</title>
</head>
<body>
    <script>
        var n = prompt('inpunt a number'), mul = 1;
        for (var i = 1 ; i <= n ; i++) {
            mul *= i
        }
        alert(mul)
    </script>
</body>
</html>